package com.xyy.ec.qualification.enums;


import java.util.HashMap;
import java.util.Map;

public enum TaskEnum {

    FIRST_BATTALION_QUALIFICATION(210001, "药品首营资质", "erp_code", "gmp_url",1000, 1440,
            "select erp_code, gmp_url from xyy_seller_product_first_qualification"),
    DRUG_REPORT(220001, "药品药检报告", "erp_code", "image_url",1000, 1440,
            "select erp_code, batch_code, image_url  from xyy_seller_product_drug_quali"),
    ;

    public static final Map<Integer, TaskEnum> FactorEnumMap = new HashMap<>();

    static {
        for (TaskEnum taskEnum : TaskEnum.values()) {
            FactorEnumMap.put(taskEnum.getTaskId(), taskEnum);
        }
    }

    private  Integer taskId;
    private  String taskName;
    private  String queryField;

    private  String valueField;
    private  Integer pageSize;
    private Integer interval;

    private String sql;

    TaskEnum(Integer taskId, String taskName, String queryField, String valueField, Integer pageSize, Integer interval,String sql) {
        this.taskId = taskId;
        this.taskName = taskName;
        this.queryField = queryField;
        this.valueField = valueField;
        this.pageSize = pageSize;
        this.interval = interval;
        this.sql = sql;
    }

    public static TaskEnum findValue(Integer taskId) {
        return FactorEnumMap.get(taskId);
    }

    public Integer getTaskId() {
        return taskId;
    }


    public String getTaskName() {
        return taskName;
    }


    public String getQueryField() {
        return queryField;
    }


    public Integer getPageSize() {
        return pageSize;
    }


    public Integer getInterval() {
        return interval;
    }

    public String getSql() {
        return sql;
    }

    public String getValueField() {
        return valueField;
    }
}
